package com.gsk.europepharma.salesReport.hibernate.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the SP_BO.TB_SP_BO_SR_SECTO table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="SP_BO.TB_SP_BO_SR_SECTO"
 */

public abstract class BasetbSpBoSRSecto  implements Serializable {

	public static String REF = "tbSpBoSRSecto";
	public static String PROP_MAJ_USER = "majUser";
	public static String PROP_DATE_MAJ = "dateMaj";
	public static String PROP_UGP = "ugp";
	public static String PROP_UGA = "uga";
	public static String PROP_REGION = "region";
	public static String PROP_NETWORK = "network";
	public static String PROP_CODE_UGP = "codeUgp";
	public static String PROP_CODE_UGA = "codeUga";
	public static String PROP_ZONE = "zone";
	public static String PROP_SECTEUR = "secteur";


	// constructors
	public BasetbSpBoSRSecto () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasetbSpBoSRSecto (
		java.lang.Integer csNetwork,
		java.lang.Integer csZone,
		java.lang.Integer csRegion,
		java.lang.Integer csSecteur,
		java.lang.Integer csCommonUga,
		java.lang.Integer csUgp) {

		this.setCsNetwork(csNetwork);
		this.setCsZone(csZone);
		this.setCsRegion(csRegion);
		this.setCsSecteur(csSecteur);
		this.setCsCommonUga(csCommonUga);
		this.setCsUgp(csUgp);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key

	private java.lang.Integer csNetwork;

	private java.lang.Integer csZone;

	private java.lang.Integer csRegion;

	private java.lang.Integer csSecteur;

	private java.lang.Integer csCommonUga;

	private java.lang.Integer csUgp;

	// fields
	private java.lang.String network;
	private java.lang.String zone;
	private java.lang.String region;
	private java.lang.String secteur;
	private java.lang.String codeUga;
	private java.lang.String uga;
	private java.lang.String codeUgp;
	private java.lang.String ugp;
	private java.lang.String majUser;
	private java.util.Date dateMaj;



	/**
     * @hibernate.property
     *  column=CS_NETWORK
	 * not-null=true
	 */
	public java.lang.Integer getCsNetwork () {
		return this.csNetwork;
	}

	/**
	 * Set the value related to the column: CS_NETWORK
	 * @param csNetwork the CS_NETWORK value
	 */
	public void setCsNetwork (java.lang.Integer csNetwork) {
		this.csNetwork = csNetwork;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_ZONE
	 * not-null=true
	 */
	public java.lang.Integer getCsZone () {
		return this.csZone;
	}

	/**
	 * Set the value related to the column: CS_ZONE
	 * @param csZone the CS_ZONE value
	 */
	public void setCsZone (java.lang.Integer csZone) {
		this.csZone = csZone;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_REGION
	 * not-null=true
	 */
	public java.lang.Integer getCsRegion () {
		return this.csRegion;
	}

	/**
	 * Set the value related to the column: CS_REGION
	 * @param csRegion the CS_REGION value
	 */
	public void setCsRegion (java.lang.Integer csRegion) {
		this.csRegion = csRegion;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_SECTEUR
	 * not-null=true
	 */
	public java.lang.Integer getCsSecteur () {
		return this.csSecteur;
	}

	/**
	 * Set the value related to the column: CS_SECTEUR
	 * @param csSecteur the CS_SECTEUR value
	 */
	public void setCsSecteur (java.lang.Integer csSecteur) {
		this.csSecteur = csSecteur;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_COMMON_UGA
	 * not-null=true
	 */
	public java.lang.Integer getCsCommonUga () {
		return this.csCommonUga;
	}

	/**
	 * Set the value related to the column: CS_COMMON_UGA
	 * @param csCommonUga the CS_COMMON_UGA value
	 */
	public void setCsCommonUga (java.lang.Integer csCommonUga) {
		this.csCommonUga = csCommonUga;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_UGP
	 * not-null=true
	 */
	public java.lang.Integer getCsUgp () {
		return this.csUgp;
	}

	/**
	 * Set the value related to the column: CS_UGP
	 * @param csUgp the CS_UGP value
	 */
	public void setCsUgp (java.lang.Integer csUgp) {
		this.csUgp = csUgp;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: NETWORK
	 */
	public java.lang.String getNetwork () {
		return network;
	}

	/**
	 * Set the value related to the column: NETWORK
	 * @param network the NETWORK value
	 */
	public void setNetwork (java.lang.String network) {
		this.network = network;
	}



	/**
	 * Return the value associated with the column: ZONE
	 */
	public java.lang.String getZone () {
		return zone;
	}

	/**
	 * Set the value related to the column: ZONE
	 * @param zone the ZONE value
	 */
	public void setZone (java.lang.String zone) {
		this.zone = zone;
	}



	/**
	 * Return the value associated with the column: REGION
	 */
	public java.lang.String getRegion () {
		return region;
	}

	/**
	 * Set the value related to the column: REGION
	 * @param region the REGION value
	 */
	public void setRegion (java.lang.String region) {
		this.region = region;
	}



	/**
	 * Return the value associated with the column: SECTEUR
	 */
	public java.lang.String getSecteur () {
		return secteur;
	}

	/**
	 * Set the value related to the column: SECTEUR
	 * @param secteur the SECTEUR value
	 */
	public void setSecteur (java.lang.String secteur) {
		this.secteur = secteur;
	}



	/**
	 * Return the value associated with the column: CODE_UGA
	 */
	public java.lang.String getCodeUga () {
		return codeUga;
	}

	/**
	 * Set the value related to the column: CODE_UGA
	 * @param codeUga the CODE_UGA value
	 */
	public void setCodeUga (java.lang.String codeUga) {
		this.codeUga = codeUga;
	}



	/**
	 * Return the value associated with the column: UGA
	 */
	public java.lang.String getUga () {
		return uga;
	}

	/**
	 * Set the value related to the column: UGA
	 * @param uga the UGA value
	 */
	public void setUga (java.lang.String uga) {
		this.uga = uga;
	}



	/**
	 * Return the value associated with the column: CODE_UGP
	 */
	public java.lang.String getCodeUgp () {
		return codeUgp;
	}

	/**
	 * Set the value related to the column: CODE_UGP
	 * @param codeUgp the CODE_UGP value
	 */
	public void setCodeUgp (java.lang.String codeUgp) {
		this.codeUgp = codeUgp;
	}



	/**
	 * Return the value associated with the column: UGP
	 */
	public java.lang.String getUgp () {
		return ugp;
	}

	/**
	 * Set the value related to the column: UGP
	 * @param ugp the UGP value
	 */
	public void setUgp (java.lang.String ugp) {
		this.ugp = ugp;
	}



	/**
	 * Return the value associated with the column: MAJ_USER
	 */
	public java.lang.String getMajUser () {
		return majUser;
	}

	/**
	 * Set the value related to the column: MAJ_USER
	 * @param majUser the MAJ_USER value
	 */
	public void setMajUser (java.lang.String majUser) {
		this.majUser = majUser;
	}



	/**
	 * Return the value associated with the column: D_MAJ
	 */
	public java.util.Date getDateMaj () {
		return dateMaj;
	}

	/**
	 * Set the value related to the column: D_MAJ
	 * @param dateMaj the D_MAJ value
	 */
	public void setDateMaj (java.util.Date dateMaj) {
		this.dateMaj = dateMaj;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto)) return false;
		else {
			com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto = (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) obj;
			if (null != this.getCsNetwork() && null != tbSpBoSRSecto.getCsNetwork()) {
				if (!this.getCsNetwork().equals(tbSpBoSRSecto.getCsNetwork())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsZone() && null != tbSpBoSRSecto.getCsZone()) {
				if (!this.getCsZone().equals(tbSpBoSRSecto.getCsZone())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsRegion() && null != tbSpBoSRSecto.getCsRegion()) {
				if (!this.getCsRegion().equals(tbSpBoSRSecto.getCsRegion())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsSecteur() && null != tbSpBoSRSecto.getCsSecteur()) {
				if (!this.getCsSecteur().equals(tbSpBoSRSecto.getCsSecteur())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsCommonUga() && null != tbSpBoSRSecto.getCsCommonUga()) {
				if (!this.getCsCommonUga().equals(tbSpBoSRSecto.getCsCommonUga())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsUgp() && null != tbSpBoSRSecto.getCsUgp()) {
				if (!this.getCsUgp().equals(tbSpBoSRSecto.getCsUgp())) {
					return false;
				}
			}
			else {
				return false;
			}
			return true;
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			StringBuilder sb = new StringBuilder();
			if (null != this.getCsNetwork()) {
				sb.append(this.getCsNetwork().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsZone()) {
				sb.append(this.getCsZone().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsRegion()) {
				sb.append(this.getCsRegion().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsSecteur()) {
				sb.append(this.getCsSecteur().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsCommonUga()) {
				sb.append(this.getCsCommonUga().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsUgp()) {
				sb.append(this.getCsUgp().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			this.hashCode = sb.toString().hashCode();
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}